/**
 * Project oo_thread
 */


#include "Mutex.h"

/**
 * Mutex implementation
 */


Mutex::Mutex() {
    pthread_mutex_init(&_mutex,nullptr);

}
Mutex::~Mutex(){
    pthread_mutex_destroy(&_mutex);
}
/**
 * @return void
 */
void Mutex::lock() {
    pthread_mutex_lock(&_mutex);
}

/**
 * @return void
 */
void Mutex::unlock() {
    pthread_mutex_unlock(&_mutex);
}

pthread_mutex_t * Mutex::getMutexptr()
{
    return &_mutex;
}

